package com.sw.mygoogleplay.utils;

import android.widget.Toast;

import com.sw.mygoogleplay.global.GooglePlayApplication;

/**
 * 吐司工具类,单例吐司
 */
public class ToastUtil {
    private static Toast toast;

    public static void showToast(String text){
        if (toast == null){
            toast = Toast.makeText(GooglePlayApplication.context, text, Toast.LENGTH_SHORT);
        }else {
            toast.setText(text);
        }
        toast.show();
    }
}
